﻿<Window x:Class="CBR_Viewer.MessageWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
        xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras"
        SnapsToDevicePixels="True"
        Height="150" Width="600"         
        Title="Message"
		WindowStartupLocation="CenterOwner" 
		ShowInTaskbar="False" 
		ResizeMode="NoResize"
        Background="#FFF4DCC1"
        mc:Ignorable="d"
        DataContext="{Binding Message, Source={StaticResource Locator}}">

    <Window.Resources>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="40"/>
            <RowDefinition Height="40"/>
        </Grid.RowDefinitions>
        <TextBlock 
                Grid.Column="0" 
                Grid.Row="0" 
                Text="{Binding Path=CaptionText}" 
                TextAlignment="Left" 
                VerticalAlignment="Center" 
                Margin="15, 2,15,2" FontWeight="Bold"></TextBlock>
        <ScrollViewer
                Grid.Column="0" 
                Grid.Row="1" 
            VerticalScrollBarVisibility="Hidden"
            HorizontalScrollBarVisibility="Auto"
            Margin="15, 2,15,2"
            >
        <TextBlock 
                Text="{Binding Path=ContentText}" 
                ToolTip="{Binding Path=ContentText}"
                TextAlignment="Left" 
                VerticalAlignment="Top" 
                ></TextBlock>
        </ScrollViewer>
        <StackPanel 
            Orientation="Horizontal" 
            Grid.Row="2" 
            HorizontalAlignment="Right" 
            VerticalAlignment="Center">
            <Button 
                Name="buttonOk" 
                Width="82" 
                Height="22" 
                Foreground="White"
                Margin="4,4,15,4" 
                Content="Ok" 
                IsDefault="True" 
                IsCancel="True"
                Style="{StaticResource BorderlessButton}"
                ToolTipService.ToolTip="Close" >
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="Click">
                        <cmd:EventToCommand Command="{Binding OKCommand}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>

            </Button>
        </StackPanel>
    </Grid>
</Window>
